package com.milk.web.exception;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ExceptionHandle {
	
	private Logger log = LoggerFactory.getLogger(getClass());

	/**
	 * 处理未知的异常
	 */
	@ExceptionHandler(value=Exception.class)
	public void handle(Exception e){
		log.error("未知的异常==>{}",e.getMessage(),e);
	}
}
